<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>mydemo</title>
</head>
<script>

window.onload = function() {
   document.oncontextmenu = function() {
            return false;
    } 
}
   // document.oncontextmenu = function() {
   //          return false;
   //  } 
</script>
<body>
<pre>
    &lt;script type="text/javasript"&gt;
    //※oncontextmenu
    document.oncontextmenu = function() {
    return false;
    }
    &lt;/script&gt;
</pre>
</body>
</html>